home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / FLEX-TC_ / PARSE.C < prev    next >
Text File  |  1990-01-23  |  32KB  |  1,295 lines

  1.  
  2. /*  A Bison parser, made from ::Flex-TC:parse.y  */
  3.  
  4. #define    CHAR    258
  5. #define    NUMBER    259
  6. #define    SECTEND    260
  7. #define    SCDECL    261
  8. #define    XSCDECL    262
  9. #define    WHITESPACE    263
  10. #define    NAME    264
  11. #define    PREVCCL    265
  12. #define    EOF_OP    266
  13.  
  14. #line 29 "::Flex-TC:parse.y"
  15.  
  16.  
  17. #include "flexdef.h"
  18.  
  19. #ifndef lint
  20.  
  21. static char copyright[] =
  22.     "@(#) Copyright (c) 1989 The Regents of the University of California.\n";
  23. static char CR_continuation[] = "@(#) All rights reserved.\n";
  24.  
  25. static char rcsid[] =
  26.     "@(#) $Header: parse.y,v 2.1 89/06/20 17:23:54 vern Exp $ (LBL)";
  27.  
  28. #endif
  29.  
  30. int pat, scnum, eps, headcnt, trailcnt, anyccl, lastchar, i, actvp, rulelen;
  31. int trlcontxt, xcluflg, cclsorted, varlength, variable_trail_rule;
  32. char clower();
  33.  
  34. static int madeany = false;  /* whether we've made the '.' character class */
  35. int previous_continued_action;    /* whether the previous rule's action was '|' */
  36.  
  37.  
  38. #ifndef YYLTYPE
  39. typedef
  40.   struct yyltype
  41.     {
  42.       int timestamp;
  43.       int first_line;
  44.       int first_column;
  45.       int last_line;
  46.       int last_column;
  47.       char *text;
  48.    }
  49.   yyltype;
  50.  
  51. #define YYLTYPE yyltype
  52. #endif
  53.  
  54. #ifndef YYSTYPE
  55. #define YYSTYPE int
  56. #endif
  57. #include <stdio.h>
  58.  
  59. #ifndef __STDC__
  60. #define const
  61. #endif
  62.  
  63.  
  64.  
  65. #define    YYFINAL        83
  66. #define    YYFLAG        -32768
  67. #define    YYNTBASE    32
  68.  
  69. #define YYTRANSLATE(x) ((unsigned)(x) <= 266 ? yytranslate[x] : 51)
  70.  
  71. static const char yytranslate[] = {     0,
  72.      2,     2,     2,     2,     2,     2,     2,     2,     2,    12,
  73.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  74.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  75.      2,     2,     2,    26,     2,    17,     2,     2,     2,    27,
  76.     28,    20,    21,    16,    31,    25,    19,     2,     2,     2,
  77.      2,     2,     2,     2,     2,     2,     2,     2,     2,    14,
  78.      2,    15,    22,     2,     2,     2,     2,     2,     2,     2,
  79.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  80.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  81.     29,     2,    30,    13,     2,     2,     2,     2,     2,     2,
  82.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  83.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  84.      2,     2,    23,    18,    24,     2,     2,     2,     2,     2,
  85.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  86.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  87.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  88.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  89.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  90.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  91.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  92.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  93.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  94.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  95.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  96.      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
  97.      2,     2,     2,     2,     2,     1,     2,     3,     4,     5,
  98.      6,     7,     8,     9,    10,    11
  99. };
  100.  
  101. static const short yyrline[] = {     0,
  102.     54,    78,    87,    88,    89,    93,    96,   106,   110,   113,
  103.    116,   120,   121,   124,   135,   155,   166,   190,   201,   204,
  104.    211,   215,   218,   227,   235,   239,   261,   276,   283,   336,
  105.    341,   366,   374,   378,   385,   392,   399,   417,   431,   449,
  106.    471,   488,   495,   498,   501,   515,   518,   532,   560,   572,
  107.    580,   591
  108. };
  109.  
  110. static const char * const yytname[] = {     0,
  111. "error","$illegal.","CHAR","NUMBER","SECTEND","SCDECL","XSCDECL","WHITESPACE","NAME","PREVCCL",
  112. "EOF_OP","'\\n'","'^'","'<'","'>'","','","'$'","'|'","'/'","'*'",
  113. "'+'","'?'","'{'","'}'","'.'","'\"'","'('","')'","'['","']'",
  114. "'-'","goal"
  115. };
  116.  
  117. static const short yyr1[] = {     0,
  118.     32,    33,    34,    34,    34,    35,    36,    36,    37,    37,
  119.     37,    38,    38,    39,    40,    40,    40,    40,    40,    40,
  120.     40,    41,    42,    42,    42,    43,    43,    44,    44,    44,
  121.     45,    46,    46,    47,    47,    47,    47,    47,    47,    47,
  122.     47,    47,    47,    47,    47,    48,    48,    49,    49,    49,
  123.     50,    50
  124. };
  125.  
  126. static const short yyr2[] = {     0,
  127.      5,     0,     5,     0,     2,     1,     1,     1,     3,     1,
  128.      1,     4,     0,     0,     4,     3,     3,     2,     2,     1,
  129.      1,     3,     3,     1,     1,     1,     0,     3,     2,     1,
  130.      2,     2,     1,     2,     2,     2,     6,     5,     4,     1,
  131.      1,     1,     3,     3,     1,     3,     4,     4,     2,     0,
  132.      2,     0
  133. };
  134.  
  135. static const short yydefact[] = {     2,
  136.      0,     0,     0,     5,     6,     7,     8,    13,     0,    14,
  137.      0,     0,    11,    10,     0,    21,    45,    42,    20,     0,
  138.      0,    40,    52,     0,    50,     0,     0,    27,     0,    30,
  139.     33,    41,     0,     3,    27,    25,    24,     0,     0,     0,
  140.     50,     0,    12,    19,     0,    27,    26,     0,    31,    18,
  141.     29,    32,    34,    35,    36,     0,     9,    17,    22,     0,
  142.     51,    43,    44,     0,    49,    46,    27,    16,    28,     0,
  143.     23,    47,     0,    15,     0,    39,    48,     0,    38,    37,
  144.      0,     0,     0
  145. };
  146.  
  147. static const short yydefgoto[] = {    81,
  148.      1,     3,     8,     9,    15,    10,    12,    26,    27,    38,
  149.     50,    28,    29,    30,    31,    32,    42,    39
  150. };
  151.  
  152. static const short yypact[] = {-32768,
  153.     60,    -3,    67,-32768,-32768,-32768,-32768,-32768,    15,-32768,
  154.     17,     3,-32768,-32768,    40,-32768,-32768,-32768,-32768,    28,
  155.     36,-32768,-32768,    28,    29,    44,    33,    58,    28,    28,
  156.     48,-32768,    54,-32768,    58,-32768,-32768,    35,    -1,    -8,
  157. -32768,     4,-32768,-32768,    28,    58,-32768,    28,-32768,-32768,
  158.     28,    48,-32768,-32768,-32768,    74,-32768,-32768,-32768,    55,
  159. -32768,-32768,-32768,     5,    49,-32768,    58,-32768,    28,    25,
  160. -32768,-32768,    76,-32768,    23,-32768,-32768,    57,-32768,-32768,
  161.     82,    83,-32768
  162. };
  163.  
  164. static const short yypgoto[] = {-32768,
  165. -32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
  166.    -34,    -5,-32768,   -24,   -30,-32768,    43,-32768
  167. };
  168.  
  169.  
  170. #define    YYLAST        84
  171.  
  172.  
  173. static const short yytable[] = {    52,
  174.     58,    61,    -1,    16,    51,    17,    65,    65,     4,    48,
  175.     49,    68,    18,    19,    35,    20,    21,    13,    40,    63,
  176.     52,    46,    11,    69,    62,    14,    78,    22,    23,    24,
  177.     17,    25,    74,    66,    72,    17,    36,    18,    52,    67,
  178.     75,    41,    18,    44,    37,    45,    79,    33,    76,    59,
  179.     60,    34,    22,    23,    24,    43,    25,    22,    23,    24,
  180.      2,    25,    57,    71,    -4,    -4,    -4,    53,    54,    55,
  181.     56,     5,     6,     7,    47,    48,    49,    70,    77,    73,
  182.     80,    82,    83,    64
  183. };
  184.  
  185. static const short yycheck[] = {    30,
  186.     35,     3,     0,     1,    29,     3,     3,     3,    12,    18,
  187.     19,    46,    10,    11,    20,    13,    14,     1,    24,    28,
  188.     51,    27,     8,    48,    26,     9,     4,    25,    26,    27,
  189.      3,    29,    67,    30,    30,     3,     1,    10,    69,    45,
  190.     16,    13,    10,    11,     9,    13,    24,     8,    24,    15,
  191.     16,    12,    25,    26,    27,    12,    29,    25,    26,    27,
  192.      1,    29,     9,     9,     5,     6,     7,    20,    21,    22,
  193.     23,     5,     6,     7,    17,    18,    19,     4,     3,    31,
  194.     24,     0,     0,    41
  195. };
  196. #define YYPURE 1
  197.  
  198. /* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
  199. #line 3 "bison.simple"
  200.  
  201. /* Skeleton output parser for bison,
  202.    Copyright (C) 1984 Bob Corbett and Richard Stallman
  203.  
  204.    This program is free software; you can redistribute it and/or modify
  205.    it under the terms of the GNU General Public License as published by
  206.    the Free Software Foundation; either version 1, or (at your option)
  207.    any later version.
  208.  
  209.    This program is distributed in the hope that it will be useful,
  210.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  211.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  212.    GNU General Public License for more details.
  213.  
  214.    You should have received a copy of the GNU General Public License
  215.    along with this program; if not, write to the Free Software
  216.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  217.  
  218.  
  219. #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__)
  220. #include <alloca.h>
  221. #endif
  222.  
  223. /* This is the parser code that is written into each bison parser
  224.   when the %semantic_parser declaration is not specified in the grammar.
  225.   It was written by Richard Stallman by simplifying the hairy parser
  226.   used when %semantic_parser is specified.  */
  227.  
  228. /* Note: there must be only one dollar sign in this file.
  229.    It is replaced by the list of actions, each action
  230.    as one case of the switch.  */
  231.  
  232. #define yyerrok        (yyerrstatus = 0)
  233. #define yyclearin    (yychar = YYEMPTY)
  234. #define YYEMPTY        -2
  235. #define YYEOF        0
  236. #define YYFAIL        goto yyerrlab;
  237. #define YYACCEPT    return(0)
  238. #define YYABORT     return(1)
  239. #define YYERROR        goto yyerrlab
  240.  
  241. #define YYTERROR    1
  242. #define YYERRCODE    256
  243.  
  244. #ifndef YYIMPURE
  245. #define YYLEX        yylex()
  246. #endif
  247.  
  248. #ifndef YYPURE
  249. #define YYLEX        yylex(&yylval, &yylloc)
  250. #endif
  251.  
  252. /* If nonreentrant, generate the variables here */
  253.  
  254. #ifndef YYIMPURE
  255.  
  256. int    yychar;            /*  the lookahead symbol        */
  257. YYSTYPE    yylval;            /*  the semantic value of the        */
  258.                 /*  lookahead symbol            */
  259.  
  260. YYLTYPE yylloc;            /*  location data for the lookahead    */
  261.                 /*  symbol                */
  262.  
  263. int yynerrs;            /*  number of parse errors so far       */
  264. #endif  /* YYIMPURE */
  265.  
  266. #if YYDEBUG != 0
  267. int yydebug;            /*  nonzero means print parse trace    */
  268. /* Since this is uninitialized, it does not stop multiple parsers
  269.    from coexisting.  */
  270. #endif
  271.  
  272. /*  YYMAXDEPTH indicates the initial size of the parser's stacks    */
  273.  
  274. #ifndef    YYMAXDEPTH
  275. #define YYMAXDEPTH 200
  276. #endif
  277.  
  278. /*  YYMAXLIMIT is the maximum size the stacks can grow to
  279.     (effective only if the built-in stack extension method is used).  */
  280.  
  281. #ifndef YYMAXLIMIT
  282. #define YYMAXLIMIT 10000
  283. #endif
  284.  
  285.  
  286. #line 90 "bison.simple"
  287. int
  288. yyparse()
  289. {
  290.   register int yystate;
  291.   register int yyn;
  292.   register short *yyssp;
  293.   register YYSTYPE *yyvsp;
  294.   YYLTYPE *yylsp;
  295.   int yyerrstatus;    /*  number of tokens to shift before error messages enabled */
  296.   int yychar1;        /*  lookahead token as an internal (translated) token number */
  297.  
  298.   short    yyssa[YYMAXDEPTH];    /*  the state stack            */
  299.   YYSTYPE yyvsa[YYMAXDEPTH];    /*  the semantic value stack        */
  300.   YYLTYPE yylsa[YYMAXDEPTH];    /*  the location stack            */
  301.  
  302.   short *yyss = yyssa;        /*  refer to the stacks thru separate pointers */
  303.   YYSTYPE *yyvs = yyvsa;    /*  to allow yyoverflow to reallocate them elsewhere */
  304.   YYLTYPE *yyls = yylsa;
  305.  
  306.   int yymaxdepth = YYMAXDEPTH;
  307.  
  308. #ifndef YYPURE
  309.   int yychar;
  310.   YYSTYPE yylval;
  311.   YYLTYPE yylloc;
  312.   int yynerrs;
  313. #endif
  314.  
  315.   YYSTYPE yyval;        /*  the variable used to return        */
  316.                 /*  semantic values from the action    */
  317.                 /*  routines                */
  318.  
  319.   int yylen;
  320.  
  321. #if YYDEBUG != 0
  322.   if (yydebug)
  323.     fprintf(stderr, "Starting parse\n");
  324. #endif
  325.  
  326.   yystate = 0;
  327.   yyerrstatus = 0;
  328.   yynerrs = 0;
  329.   yychar = YYEMPTY;        /* Cause a token to be read.  */
  330.  
  331.   /* Initialize stack pointers.
  332.      Waste one element of value and location stack
  333.      so that they stay on the same level as the state stack.  */
  334.  
  335.   yyssp = yyss - 1;
  336.   yyvsp = yyvs;
  337.   yylsp = yyls;
  338.  
  339. /* Push a new state, which is found in  yystate  .  */
  340. /* In all cases, when you get here, the value and location stacks
  341.    have just been pushed. so pushing a state here evens the stacks.  */
  342. yynewstate:
  343.  
  344.   *++yyssp = yystate;
  345.  
  346.   if (yyssp >= yyss + yymaxdepth - 1)
  347.     {
  348.       /* Give user a chance to reallocate the stack */
  349.       /* Use copies of these so that the &'s don't force the real ones into memory. */
  350.       YYSTYPE *yyvs1 = yyvs;
  351.       YYLTYPE *yyls1 = yyls;
  352.       short *yyss1 = yyss;
  353.  
  354.       /* Get the current used size of the three stacks, in elements.  */
  355.       int size = yyssp - yyss + 1;
  356.  
  357. #ifdef yyoverflow
  358.       /* Each stack pointer address is followed by the size of
  359.      the data in use in that stack, in bytes.  */
  360.       yyoverflow("parser stack overflow",
  361.          &yyss1, size * sizeof (*yyssp),
  362.          &yyvs1, size * sizeof (*yyvsp),
  363.          &yyls1, size * sizeof (*yylsp),
  364.          &yymaxdepth);
  365.  
  366.       yyss = yyss1; yyvs = yyvs1; yyls = yyls1;
  367. #else /* no yyoverflow */
  368.       /* Extend the stack our own way.  */
  369.       if (yymaxdepth >= YYMAXLIMIT)
  370.     yyerror("parser stack overflow");
  371.       yymaxdepth *= 2;
  372.       if (yymaxdepth > YYMAXLIMIT)
  373.     yymaxdepth = YYMAXLIMIT;
  374.       yyss = (short *) alloca (yymaxdepth * sizeof (*yyssp));
  375.       bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
  376.       yyvs = (YYSTYPE *) alloca (yymaxdepth * sizeof (*yyvsp));
  377.       bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
  378. #ifdef YYLSP_NEEDED
  379.       yyls = (YYLTYPE *) alloca (yymaxdepth * sizeof (*yylsp));
  380.       bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
  381. #endif
  382. #endif /* no yyoverflow */
  383.  
  384.       yyssp = yyss + size - 1;
  385.       yyvsp = yyvs + size - 1;
  386. #ifdef YYLSP_NEEDED
  387.       yylsp = yyls + size - 1;
  388. #endif
  389.  
  390. #if YYDEBUG != 0
  391.       if (yydebug)
  392.     fprintf(stderr, "Stack size increased to %d\n", yymaxdepth);
  393. #endif
  394.  
  395.       if (yyssp >= yyss + yymaxdepth - 1)
  396.     YYABORT;
  397.     }
  398.  
  399. #if YYDEBUG != 0
  400.   if (yydebug)
  401.     fprintf(stderr, "Entering state %d\n", yystate);
  402. #endif
  403.  
  404. /* Do appropriate processing given the current state.  */
  405. /* Read a lookahead token if we need one and don't already have one.  */
  406. yyresume:
  407.  
  408.   /* First try to decide what to do without reference to lookahead token.  */
  409.  
  410.   yyn = yypact[yystate];
  411.   if (yyn == YYFLAG)
  412.     goto yydefault;
  413.  
  414.   /* Not known => get a lookahead token if don't already have one.  */
  415.  
  416.   /* yychar is either YYEMPTY or YYEOF
  417.      or a valid token in external form.  */
  418.  
  419.   if (yychar == YYEMPTY)
  420.     {
  421. #if YYDEBUG != 0
  422.       if (yydebug)
  423.     fprintf(stderr, "Reading a token: ");
  424. #endif
  425.       yychar = YYLEX;
  426.     }
  427.  
  428.   /* Convert token to internal form (in yychar1) for indexing tables with */
  429.  
  430.   if (yychar <= 0)        /* This means end of input. */
  431.     {
  432.       yychar1 = 0;
  433.       yychar = YYEOF;        /* Don't call YYLEX any more */
  434.  
  435. #if YYDEBUG != 0
  436.       if (yydebug)
  437.     fprintf(stderr, "Now at end of input.\n");
  438. #endif
  439.     }
  440.   else
  441.     {
  442.       yychar1 = YYTRANSLATE(yychar);
  443.  
  444. #if YYDEBUG != 0
  445.       if (yydebug)
  446.     fprintf(stderr, "Next token is %d (%s)\n", yychar, yytname[yychar1]);
  447. #endif
  448.     }
  449.  
  450.   yyn += yychar1;
  451.   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
  452.     goto yydefault;
  453.  
  454.   yyn = yytable[yyn];
  455.  
  456.   /* yyn is what to do for this token type in this state.
  457.      Negative => reduce, -yyn is rule number.
  458.      Positive => shift, yyn is new state.
  459.        New state is final state => don't bother to shift,
  460.        just return success.
  461.      0, or most negative number => error.  */
  462.  
  463.   if (yyn < 0)
  464.     {
  465.       if (yyn == YYFLAG)
  466.     goto yyerrlab;
  467.       yyn = -yyn;
  468.       goto yyreduce;
  469.     }
  470.   else if (yyn == 0)
  471.     goto yyerrlab;
  472.  
  473.   if (yyn == YYFINAL)
  474.     YYACCEPT;
  475.  
  476.   /* Shift the lookahead token.  */
  477.  
  478. #if YYDEBUG != 0
  479.   if (yydebug)
  480.     fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
  481. #endif
  482.  
  483.   /* Discard the token being shifted unless it is eof.  */
  484.   if (yychar != YYEOF)
  485.     yychar = YYEMPTY;
  486.  
  487.   *++yyvsp = yylval;
  488. #ifdef YYLSP_NEEDED
  489.   *++yylsp = yylloc;
  490. #endif
  491.  
  492.   /* count tokens shifted since error; after three, turn off error status.  */
  493.   if (yyerrstatus) yyerrstatus--;
  494.  
  495.   yystate = yyn;
  496.   goto yynewstate;
  497.  
  498. /* Do the default action for the current state.  */
  499. yydefault:
  500.  
  501.   yyn = yydefact[yystate];
  502.   if (yyn == 0)
  503.     goto yyerrlab;
  504.  
  505. /* Do a reduction.  yyn is the number of a rule to reduce with.  */
  506. yyreduce:
  507.   yylen = yyr2[yyn];
  508.   yyval = yyvsp[1-yylen]; /* implement default value of the action */
  509.  
  510. #if YYDEBUG != 0
  511.   if (yydebug)
  512.     {
  513.       if (yylen == 1)
  514.     fprintf (stderr, "Reducing 1 value via line %d, ",
  515.          yyrline[yyn]);
  516.       else
  517.     fprintf (stderr, "Reducing %d values via line %d, ",
  518.          yylen, yyrline[yyn]);
  519.     }
  520. #endif
  521.  
  522.  
  523.   switch (yyn) {
  524.  
  525. case 1:
  526. #line 55 "::Flex-TC:parse.y"
  527. { /* add default rule */
  528.             int def_rule;
  529.  
  530.             pat = cclinit();
  531.             cclnegate( pat );
  532.  
  533.             def_rule = mkstate( -pat );
  534.  
  535.             finish_rule( def_rule, false, 0, 0 );
  536.  
  537.             for ( i = 1; i <= lastsc; ++i )
  538.                 scset[i] = mkbranch( scset[i], def_rule );
  539.  
  540.             if ( spprdflt )
  541.                 fputs( "YY_FATAL_ERROR( \"flex scanner jammed\" )",
  542.                    temp_action_file );
  543.             else
  544.                 fputs( "ECHO", temp_action_file );
  545.  
  546.             fputs( ";\n\tYY_BREAK\n", temp_action_file );
  547.             ;
  548.     break;}
  549. case 2:
  550. #line 79 "::Flex-TC:parse.y"
  551. {
  552.             /* initialize for processing rules */
  553.  
  554.             /* create default DFA start condition */
  555.             scinstal( "INITIAL", false );
  556.             ;
  557.     break;}
  558. case 5:
  559. #line 90 "::Flex-TC:parse.y"
  560. { synerr( "unknown error processing section 1" ); ;
  561.     break;}
  562. case 7:
  563. #line 97 "::Flex-TC:parse.y"
  564. {
  565.             /* these productions are separate from the s1object
  566.              * rule because the semantics must be done before
  567.              * we parse the remainder of an s1object
  568.              */
  569.  
  570.             xcluflg = false;
  571.             ;
  572.     break;}
  573. case 8:
  574. #line 107 "::Flex-TC:parse.y"
  575. { xcluflg = true; ;
  576.     break;}
  577. case 9:
  578. #line 111 "::Flex-TC:parse.y"
  579. { scinstal( nmstr, xcluflg ); ;
  580.     break;}
  581. case 10:
  582. #line 114 "::Flex-TC:parse.y"
  583. { scinstal( nmstr, xcluflg ); ;
  584.     break;}
  585. case 11:
  586. #line 117 "::Flex-TC:parse.y"
  587. { synerr( "bad start condition list" ); ;
  588.     break;}
  589. case 14:
  590. #line 125 "::Flex-TC:parse.y"
  591. {
  592.             /* initialize for a parse of one rule */
  593.             trlcontxt = variable_trail_rule = varlength = false;
  594.             trailcnt = headcnt = rulelen = 0;
  595.             current_state_type = STATE_NORMAL;
  596.             previous_continued_action = continued_action;
  597.             new_rule();
  598.             ;
  599.     break;}
  600. case 15:
  601. #line 136 "::Flex-TC:parse.y"
  602. {
  603.             pat = link_machines( yyvsp[-1], yyvsp[0] );
  604.             finish_rule( pat, variable_trail_rule,
  605.                      headcnt, trailcnt );
  606.  
  607.             for ( i = 1; i <= actvp; ++i )
  608.                 scbol[actvsc[i]] =
  609.                 mkbranch( scbol[actvsc[i]], pat );
  610.  
  611.             if ( ! bol_needed )
  612.                 {
  613.                 bol_needed = true;
  614.  
  615.                 if ( performance_report )
  616.                 fprintf( stderr,
  617.             "'^' operator results in sub-optimal performance\n" );
  618.                 }
  619.             ;
  620.     break;}
  621. case 16:
  622. #line 156 "::Flex-TC:parse.y"
  623. {
  624.             pat = link_machines( yyvsp[-1], yyvsp[0] );
  625.             finish_rule( pat, variable_trail_rule,
  626.                      headcnt, trailcnt );
  627.  
  628.             for ( i = 1; i <= actvp; ++i )
  629.                 scset[actvsc[i]] = 
  630.                 mkbranch( scset[actvsc[i]], pat );
  631.             ;
  632.     break;}
  633. case 17:
  634. #line 167 "::Flex-TC:parse.y"
  635. {
  636.             pat = link_machines( yyvsp[-1], yyvsp[0] );
  637.             finish_rule( pat, variable_trail_rule,
  638.                      headcnt, trailcnt );
  639.  
  640.             /* add to all non-exclusive start conditions,
  641.              * including the default (0) start condition
  642.              */
  643.  
  644.             for ( i = 1; i <= lastsc; ++i )
  645.                 if ( ! scxclu[i] )
  646.                 scbol[i] = mkbranch( scbol[i], pat );
  647.  
  648.             if ( ! bol_needed )
  649.                 {
  650.                 bol_needed = true;
  651.  
  652.                 if ( performance_report )
  653.                 fprintf( stderr,
  654.             "'^' operator results in sub-optimal performance\n" );
  655.                 }
  656.             ;
  657.     break;}
  658. case 18:
  659. #line 191 "::Flex-TC:parse.y"
  660. {
  661.             pat = link_machines( yyvsp[-1], yyvsp[0] );
  662.             finish_rule( pat, variable_trail_rule,
  663.                      headcnt, trailcnt );
  664.  
  665.             for ( i = 1; i <= lastsc; ++i )
  666.                 if ( ! scxclu[i] )
  667.                 scset[i] = mkbranch( scset[i], pat );
  668.             ;
  669.     break;}
  670. case 19:
  671. #line 202 "::Flex-TC:parse.y"
  672. { build_eof_action(); ;
  673.     break;}
  674. case 20:
  675. #line 205 "::Flex-TC:parse.y"
  676. {
  677.             /* this EOF applies only to the INITIAL start cond. */
  678.             actvsc[actvp = 1] = 1;
  679.             build_eof_action();
  680.             ;
  681.     break;}
  682. case 21:
  683. #line 212 "::Flex-TC:parse.y"
  684. { synerr( "unrecognized rule" ); ;
  685.     break;}
  686. case 23:
  687. #line 219 "::Flex-TC:parse.y"
  688. {
  689.             if ( (scnum = sclookup( nmstr )) == 0 )
  690.                 lerrsf( "undeclared start condition %s", nmstr );
  691.  
  692.             else
  693.                 actvsc[++actvp] = scnum;
  694.             ;
  695.     break;}
  696. case 24:
  697. #line 228 "::Flex-TC:parse.y"
  698. {
  699.             if ( (scnum = sclookup( nmstr )) == 0 )
  700.                 lerrsf( "undeclared start condition %s", nmstr );
  701.             else
  702.                 actvsc[actvp = 1] = scnum;
  703.             ;
  704.     break;}
  705. case 25:
  706. #line 236 "::Flex-TC:parse.y"
  707. { synerr( "bad start condition list" ); ;
  708.     break;}
  709. case 26:
  710. #line 240 "::Flex-TC:parse.y"
  711. {
  712.             if ( trlcontxt )
  713.                 {
  714.                 synerr( "trailing context used twice" );
  715.                 yyval = mkstate( SYM_EPSILON );
  716.                 }
  717.             else
  718.                 {
  719.                 trlcontxt = true;
  720.  
  721.                 if ( ! varlength )
  722.                 headcnt = rulelen;
  723.  
  724.                 ++rulelen;
  725.                 trailcnt = 1;
  726.  
  727.                 eps = mkstate( SYM_EPSILON );
  728.                 yyval = link_machines( eps, mkstate( '\n' ) );
  729.                 }
  730.             ;
  731.     break;}
  732. case 27:
  733. #line 262 "::Flex-TC:parse.y"
  734. {
  735.                 yyval = mkstate( SYM_EPSILON );
  736.  
  737.             if ( trlcontxt )
  738.                 {
  739.                 if ( varlength && headcnt == 0 )
  740.                 /* both head and trail are variable-length */
  741.                 variable_trail_rule = true;
  742.                 else
  743.                 trailcnt = rulelen;
  744.                 }
  745.                 ;
  746.     break;}
  747. case 28:
  748. #line 277 "::Flex-TC:parse.y"
  749. {
  750.             varlength = true;
  751.  
  752.             yyval = mkor( yyvsp[-2], yyvsp[0] );
  753.             ;
  754.     break;}
  755. case 29:
  756. #line 284 "::Flex-TC:parse.y"
  757. {
  758.             if ( transchar[lastst[yyvsp[0]]] != SYM_EPSILON )
  759.                 /* provide final transition \now/ so it
  760.                  * will be marked as a trailing context
  761.                  * state
  762.                  */
  763.                 yyvsp[0] = link_machines( yyvsp[0], mkstate( SYM_EPSILON ) );
  764.  
  765.             mark_beginning_as_normal( yyvsp[0] );
  766.             current_state_type = STATE_NORMAL;
  767.  
  768.             if ( previous_continued_action )
  769.                 {
  770.                 /* we need to treat this as variable trailing
  771.                  * context so that the backup does not happen
  772.                  * in the action but before the action switch
  773.                  * statement.  If the backup happens in the
  774.                  * action, then the rules "falling into" this
  775.                  * one's action will *also* do the backup,
  776.                  * erroneously.
  777.                  */
  778.                 if ( ! varlength || headcnt != 0 )
  779.                 {
  780.                 fprintf( stderr,
  781.     "flex: warning - trailing context rule at line %d made variable because\n",
  782.                      linenum );
  783.                 fprintf( stderr,
  784.                      "      of preceding '|' action\n" );
  785.                 }
  786.  
  787.                 /* mark as variable */
  788.                 varlength = true;
  789.                 headcnt = 0;
  790.                 }
  791.  
  792.             if ( varlength && headcnt == 0 )
  793.                 { /* variable trailing context rule */
  794.                 /* mark the first part of the rule as the accepting
  795.                  * "head" part of a trailing context rule
  796.                  */
  797.                 /* by the way, we didn't do this at the beginning
  798.                  * of this production because back then
  799.                  * current_state_type was set up for a trail
  800.                  * rule, and add_accept() can create a new
  801.                  * state ...
  802.                  */
  803.                 add_accept( yyvsp[-1], num_rules | YY_TRAILING_HEAD_MASK );
  804.                 }
  805.  
  806.             yyval = link_machines( yyvsp[-1], yyvsp[0] );
  807.             ;
  808.     break;}
  809. case 30:
  810. #line 337 "::Flex-TC:parse.y"
  811. { yyval = yyvsp[0]; ;
  812.     break;}
  813. case 31:
  814. #line 342 "::Flex-TC:parse.y"
  815. {
  816.             /* this rule is separate from the others for "re" so
  817.              * that the reduction will occur before the trailing
  818.              * series is parsed
  819.              */
  820.  
  821.             if ( trlcontxt )
  822.                 synerr( "trailing context used twice" );
  823.             else
  824.                 trlcontxt = true;
  825.  
  826.             if ( varlength )
  827.                 /* we hope the trailing context is fixed-length */
  828.                 varlength = false;
  829.             else
  830.                 headcnt = rulelen;
  831.  
  832.             rulelen = 0;
  833.  
  834.             current_state_type = STATE_TRAILING_CONTEXT;
  835.             yyval = yyvsp[-1];
  836.             ;
  837.     break;}
  838. case 32:
  839. #line 367 "::Flex-TC:parse.y"
  840. {
  841.             /* this is where concatenation of adjacent patterns
  842.              * gets done
  843.              */
  844.             yyval = link_machines( yyvsp[-1], yyvsp[0] );
  845.             ;
  846.     break;}
  847. case 33:
  848. #line 375 "::Flex-TC:parse.y"
  849. { yyval = yyvsp[0]; ;
  850.     break;}
  851. case 34:
  852. #line 379 "::Flex-TC:parse.y"
  853. {
  854.             varlength = true;
  855.  
  856.             yyval = mkclos( yyvsp[-1] );
  857.             ;
  858.     break;}
  859. case 35:
  860. #line 386 "::Flex-TC:parse.y"
  861. {
  862.             varlength = true;
  863.  
  864.             yyval = mkposcl( yyvsp[-1] );
  865.             ;
  866.     break;}
  867. case 36:
  868. #line 393 "::Flex-TC:parse.y"
  869. {
  870.             varlength = true;
  871.  
  872.             yyval = mkopt( yyvsp[-1] );
  873.             ;
  874.     break;}
  875. case 37:
  876. #line 400 "::Flex-TC:parse.y"
  877. {
  878.             varlength = true;
  879.  
  880.             if ( yyvsp[-3] > yyvsp[-1] || yyvsp[-3] < 0 )
  881.                 {
  882.                 synerr( "bad iteration values" );
  883.                 yyval = yyvsp[-5];
  884.                 }
  885.             else
  886.                 {
  887.                 if ( yyvsp[-3] == 0 )
  888.                 yyval = mkopt( mkrep( yyvsp[-5], yyvsp[-3], yyvsp[-1] ) );
  889.                 else
  890.                 yyval = mkrep( yyvsp[-5], yyvsp[-3], yyvsp[-1] );
  891.                 }
  892.             ;
  893.     break;}
  894. case 38:
  895. #line 418 "::Flex-TC:parse.y"
  896. {
  897.             varlength = true;
  898.  
  899.             if ( yyvsp[-2] <= 0 )
  900.                 {
  901.                 synerr( "iteration value must be positive" );
  902.                 yyval = yyvsp[-4];
  903.                 }
  904.  
  905.             else
  906.                 yyval = mkrep( yyvsp[-4], yyvsp[-2], INFINITY );
  907.             ;
  908.     break;}
  909. case 39:
  910. #line 432 "::Flex-TC:parse.y"
  911. {
  912.             /* the singleton could be something like "(foo)",
  913.              * in which case we have no idea what its length
  914.              * is, so we punt here.
  915.              */
  916.             varlength = true;
  917.  
  918.             if ( yyvsp[-1] <= 0 )
  919.                 {
  920.                 synerr( "iteration value must be positive" );
  921.                 yyval = yyvsp[-3];
  922.                 }
  923.  
  924.             else
  925.                 yyval = link_machines( yyvsp[-3], copysingl( yyvsp[-3], yyvsp[-1] - 1 ) );
  926.             ;
  927.     break;}
  928. case 40:
  929. #line 450 "::Flex-TC:parse.y"
  930. {
  931.             if ( ! madeany )
  932.                 {
  933.                 /* create the '.' character class */
  934.                 anyccl = cclinit();
  935.                 ccladd( anyccl, '\n' );
  936.                 cclnegate( anyccl );
  937.  
  938.                 if ( useecs )
  939.                 mkeccl( ccltbl + cclmap[anyccl],
  940.                     ccllen[anyccl], nextecm,
  941.                     ecgroup, CSIZE );
  942.                 
  943.                 madeany = true;
  944.                 }
  945.  
  946.             ++rulelen;
  947.  
  948.             yyval = mkstate( -anyccl );
  949.             ;
  950.     break;}
  951. case 41:
  952. #line 472 "::Flex-TC:parse.y"
  953. {
  954.             if ( ! cclsorted )
  955.                 /* sort characters for fast searching.  We use a
  956.                  * shell sort since this list could be large.
  957.                  */
  958.                 cshell( ccltbl + cclmap[yyvsp[0]], ccllen[yyvsp[0]] );
  959.  
  960.             if ( useecs )
  961.                 mkeccl( ccltbl + cclmap[yyvsp[0]], ccllen[yyvsp[0]],
  962.                     nextecm, ecgroup, CSIZE );
  963.                      
  964.             ++rulelen;
  965.  
  966.             yyval = mkstate( -yyvsp[0] );
  967.             ;
  968.     break;}
  969. case 42:
  970. #line 489 "::Flex-TC:parse.y"
  971. {
  972.             ++rulelen;
  973.  
  974.             yyval = mkstate( -yyvsp[0] );
  975.             ;
  976.     break;}
  977. case 43:
  978. #line 496 "::Flex-TC:parse.y"
  979. { yyval = yyvsp[-1]; ;
  980.     break;}
  981. case 44:
  982. #line 499 "::Flex-TC:parse.y"
  983. { yyval = yyvsp[-1]; ;
  984.     break;}
  985. case 45:
  986. #line 502 "::Flex-TC:parse.y"
  987. {
  988.             ++rulelen;
  989.  
  990.             if ( yyvsp[0] == '\0' )
  991.                 synerr( "null in rule" );
  992.  
  993.             if ( caseins && yyvsp[0] >= 'A' && yyvsp[0] <= 'Z' )
  994.                 yyvsp[0] = clower( yyvsp[0] );
  995.  
  996.             yyval = mkstate( yyvsp[0] );
  997.             ;
  998.     break;}
  999. case 46:
  1000. #line 516 "::Flex-TC:parse.y"
  1001. { yyval = yyvsp[-1]; ;
  1002.     break;}
  1003. case 47:
  1004. #line 519 "::Flex-TC:parse.y"
  1005. {
  1006.             /* *Sigh* - to be compatible Unix lex, negated ccls
  1007.              * match newlines
  1008.              */
  1009. #ifdef NOTDEF
  1010.             ccladd( yyvsp[-1], '\n' ); /* negated ccls don't match '\n' */
  1011.             cclsorted = false; /* because we added the newline */
  1012. #endif
  1013.             cclnegate( yyvsp[-1] );
  1014.             yyval = yyvsp[-1];
  1015.             ;
  1016.     break;}
  1017. case 48:
  1018. #line 533 "::Flex-TC:parse.y"
  1019. {
  1020.             if ( yyvsp[-2] > yyvsp[0] )
  1021.                 synerr( "negative range in character class" );
  1022.  
  1023.             else
  1024.                 {
  1025.                 if ( caseins )
  1026.                 {
  1027.                 if ( yyvsp[-2] >= 'A' && yyvsp[-2] <= 'Z' )
  1028.                     yyvsp[-2] = clower( yyvsp[-2] );
  1029.                 if ( yyvsp[0] >= 'A' && yyvsp[0] <= 'Z' )
  1030.                     yyvsp[0] = clower( yyvsp[0] );
  1031.                 }
  1032.  
  1033.                 for ( i = yyvsp[-2]; i <= yyvsp[0]; ++i )
  1034.                     ccladd( yyvsp[-3], i );
  1035.  
  1036.                 /* keep track if this ccl is staying in alphabetical
  1037.                  * order
  1038.                  */
  1039.                 cclsorted = cclsorted && (yyvsp[-2] > lastchar);
  1040.                 lastchar = yyvsp[0];
  1041.                 }
  1042.             
  1043.             yyval = yyvsp[-3];
  1044.             ;
  1045.     break;}
  1046. case 49:
  1047. #line 561 "::Flex-TC:parse.y"
  1048. {
  1049.             if ( caseins )
  1050.                 if ( yyvsp[0] >= 'A' && yyvsp[0] <= 'Z' )
  1051.                 yyvsp[0] = clower( yyvsp[0] );
  1052.  
  1053.             ccladd( yyvsp[-1], yyvsp[0] );
  1054.             cclsorted = cclsorted && (yyvsp[0] > lastchar);
  1055.             lastchar = yyvsp[0];
  1056.             yyval = yyvsp[-1];
  1057.             ;
  1058.     break;}
  1059. case 50:
  1060. #line 573 "::Flex-TC:parse.y"
  1061. {
  1062.             cclsorted = true;
  1063.             lastchar = 0;
  1064.             yyval = cclinit();
  1065.             ;
  1066.     break;}
  1067. case 51:
  1068. #line 581 "::Flex-TC:parse.y"
  1069. {
  1070.             if ( caseins )
  1071.                 if ( yyvsp[0] >= 'A' && yyvsp[0] <= 'Z' )
  1072.                 yyvsp[0] = clower( yyvsp[0] );
  1073.  
  1074.             ++rulelen;
  1075.  
  1076.             yyval = link_machines( yyvsp[-1], mkstate( yyvsp[0] ) );
  1077.             ;
  1078.     break;}
  1079. case 52:
  1080. #line 592 "::Flex-TC:parse.y"
  1081. { yyval = mkstate( SYM_EPSILON ); ;
  1082.     break;}
  1083. }
  1084.    /* the action file gets copied in in place of this dollarsign */
  1085. #line 327 "bison.simple"
  1086.  
  1087.   yyvsp -= yylen;
  1088.   yyssp -= yylen;
  1089. #ifdef YYLSP_NEEDED
  1090.   yylsp -= yylen;
  1091. #endif
  1092.  
  1093. #if YYDEBUG != 0
  1094.   if (yydebug)
  1095.     {
  1096.       short *ssp1 = yyss - 1;
  1097.       fprintf (stderr, "state stack now");
  1098.       while (ssp1 != yyssp)
  1099.     fprintf (stderr, " %d", *++ssp1);
  1100.       fprintf (stderr, "\n");
  1101.     }
  1102. #endif
  1103.  
  1104.   *++yyvsp = yyval;
  1105.  
  1106. #ifdef YYLSP_NEEDED
  1107.   yylsp++;
  1108.   if (yylen == 0)
  1109.     {
  1110.       yylsp->first_line = yylloc.first_line;
  1111.       yylsp->first_column = yylloc.first_column;
  1112.       yylsp->last_line = (yylsp-1)->last_line;
  1113.       yylsp->last_column = (yylsp-1)->last_column;
  1114.       yylsp->text = 0;
  1115.     }
  1116.   else
  1117.     {
  1118.       yylsp->last_line = (yylsp+yylen-1)->last_line;
  1119.       yylsp->last_column = (yylsp+yylen-1)->last_column;
  1120.     }
  1121. #endif
  1122.  
  1123.   /* Now "shift" the result of the reduction.
  1124.      Determine what state that goes to,
  1125.      based on the state we popped back to
  1126.      and the rule number reduced by.  */
  1127.  
  1128.   yyn = yyr1[yyn];
  1129.  
  1130.   yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  1131.   if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
  1132.     yystate = yytable[yystate];
  1133.   else
  1134.     yystate = yydefgoto[yyn - YYNTBASE];
  1135.  
  1136.   goto yynewstate;
  1137.  
  1138. yyerrlab:   /* here on detecting error */
  1139.  
  1140.   if (! yyerrstatus)
  1141.     /* If not already recovering from an error, report this error.  */
  1142.     {
  1143.       ++yynerrs;
  1144.       yyerror("parse error");
  1145.     }
  1146.  
  1147.   if (yyerrstatus == 3)
  1148.     {
  1149.       /* if just tried and failed to reuse lookahead token after an error, discard it.  */
  1150.  
  1151.       /* return failure if at end of input */
  1152.       if (yychar == YYEOF)
  1153.     YYABORT;
  1154.  
  1155. #if YYDEBUG != 0
  1156.       if (yydebug)
  1157.     fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
  1158. #endif
  1159.  
  1160.       yychar = YYEMPTY;
  1161.     }
  1162.  
  1163.   /* Else will try to reuse lookahead token
  1164.      after shifting the error token.  */
  1165.  
  1166.   yyerrstatus = 3;        /* Each real token shifted decrements this */
  1167.  
  1168.   goto yyerrhandle;
  1169.  
  1170. yyerrdefault:  /* current state does not do anything special for the error token. */
  1171.  
  1172. #if 0
  1173.   /* This is wrong; only states that explicitly want error tokens
  1174.      should shift them.  */
  1175.   yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
  1176.   if (yyn) goto yydefault;
  1177. #endif
  1178.  
  1179. yyerrpop:   /* pop the current state because it cannot handle the error token */
  1180.  
  1181.   if (yyssp == yyss) YYABORT;
  1182.   yyvsp--;
  1183.   yystate = *--yyssp;
  1184. #ifdef YYLSP_NEEDED
  1185.   yylsp--;
  1186. #endif
  1187.  
  1188. #if YYDEBUG != 0
  1189.   if (yydebug)
  1190.     {
  1191.       short *ssp1 = yyss - 1;
  1192.       fprintf (stderr, "Error: state stack now");
  1193.       while (ssp1 != yyssp)
  1194.     fprintf (stderr, " %d", *++ssp1);
  1195.       fprintf (stderr, "\n");
  1196.     }
  1197. #endif
  1198.  
  1199. yyerrhandle:
  1200.  
  1201.   yyn = yypact[yystate];
  1202.   if (yyn == YYFLAG)
  1203.     goto yyerrdefault;
  1204.  
  1205.   yyn += YYTERROR;
  1206.   if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
  1207.     goto yyerrdefault;
  1208.  
  1209.   yyn = yytable[yyn];
  1210.   if (yyn < 0)
  1211.     {
  1212.       if (yyn == YYFLAG)
  1213.     goto yyerrpop;
  1214.       yyn = -yyn;
  1215.       goto yyreduce;
  1216.     }
  1217.   else if (yyn == 0)
  1218.     goto yyerrpop;
  1219.  
  1220.   if (yyn == YYFINAL)
  1221.     YYACCEPT;
  1222.  
  1223. #if YYDEBUG != 0
  1224.   if (yydebug)
  1225.     fprintf(stderr, "Shifting error token, ");
  1226. #endif
  1227.  
  1228.   *++yyvsp = yylval;
  1229. #ifdef YYLSP_NEEDED
  1230.   *++yylsp = yylloc;
  1231. #endif
  1232.  
  1233.   yystate = yyn;
  1234.   goto yynewstate;
  1235. }
  1236. #line 595 "::Flex-TC:parse.y"
  1237.  
  1238.  
  1239.  
  1240. /* build_eof_action - build the "<<EOF>>" action for the active start
  1241.  *                    conditions
  1242.  */
  1243.  
  1244. build_eof_action()
  1245.  
  1246.     {
  1247.     register int i;
  1248.  
  1249.     for ( i = 1; i <= actvp; ++i )
  1250.     {
  1251.     if ( sceof[actvsc[i]] )
  1252.         lerrsf( "multiple <<EOF>> rules for start condition %s",
  1253.             scname[actvsc[i]] );
  1254.  
  1255.     else
  1256.         {
  1257.         sceof[actvsc[i]] = true;
  1258.         fprintf( temp_action_file, "case YY_STATE_EOF(%s):\n",
  1259.              scname[actvsc[i]] );
  1260.         }
  1261.     }
  1262.  
  1263.     line_directive_out( temp_action_file );
  1264.     }
  1265.  
  1266.  
  1267. /* synerr - report a syntax error
  1268.  *
  1269.  * synopsis
  1270.  *    char str[];
  1271.  *    synerr( str );
  1272.  */
  1273.  
  1274. synerr( str )
  1275. char str[];
  1276.  
  1277.     {
  1278.     syntaxerror = true;
  1279.     fprintf( stderr, "Syntax error at line %d: %s\n", linenum, str );
  1280.     }
  1281.  
  1282.  
  1283. /* yyerror - eat up an error message from the parser
  1284.  *
  1285.  * synopsis
  1286.  *    char msg[];
  1287.  *    yyerror( msg );
  1288.  */
  1289.  
  1290. yyerror( msg )
  1291. char msg[];
  1292.  
  1293.     {
  1294.     }
  1295.